package com.studykun.client.util;

import java.util.ArrayList;

public class ProgressChangedHandlers {
  private ArrayList<ProgressChangedHandler> handlers_ =
    new ArrayList<ProgressChangedHandler>();
  
  public void addProgressChangedHandler(
      final ProgressChangedHandler handler) {
    handlers_.add(handler);
  }

  public void removeProgressChangedHandler(
      final ProgressChangedHandler handler) {
    handlers_.remove(handler);
  }

  public void fireProgressChanged() {
    for (final ProgressChangedHandler handler : handlers_) {
      handler.onProgressChanged();
    }
  }
}
